export default [
  // app
  {
    path: '/',
    component: '../layouts/Routers',
    routes: [
      {
        name: '错误',
        path: '/exception',
        routes: [
          // exception
          {
            path: '/exception/403',
            name: 'not-permission',
            component: './system/exception/403',
          },
          {
            path: '/exception/404',
            name: 'not-find',
            component: './system/exception/404',
          },
          {
            path: '/exception/500',
            name: 'server-error',
            component: './system/exception/500',
          },
          {
            path: '/exception/trigger',
            name: 'trigger',
            hideInMenu: true,
            component: './system/exception/TriggerException',
          },
          // {
          //   component: '404',
          // },
        ],
      },
      {
        path: '/:storeId/',
        component: '../layouts/BasicLayout',
        Routes: ['src/pages/Authorized'],
        routes: [
          // dashboard
          { path: '/:storeId/', redirect: '/:storeId/dashboard' },
          {
            path: '/:storeId/dashboard',
            component: './store/dashboard/index',
            name: '概况',
          },
          {
            path: '/:storeId/localdelivery/settings',
            name: '同城配送',
            component: './order/sameCityDistribution/index',
          },
          {
            path: '/:storeId/logs',
            name: '操作日志',
            component: './setting/operationLog/operationLog',
          },
          {
            path: '/:storeId/payments',
            name: '支付设置',
            component: './weapp/xcxpay/index',
          },
          {
            path: '/:storeId/store',
            name: '店铺',
            routes: [
              { path: '/:storeId/store', redirect: '/:storeId/store/pages' },
              {
                path: '/:storeId/store/pages',
                name: '微页面',
                component: './store/microPage/index',
              },
              {
                path: '/:storeId/store/pages/edit/:id',
                name: '微页面',
                component: './store/microPage/edit',
              },
              {
                path: '/:storeId/store/pages/draft',
                name: '草稿箱',
                component: './store/microPage/index',
              },
              {
                path: '/:storeId/store/pages/draftedit/:id',
                name: '微页面',
                component: './store/microPage/edit',
              },
              {
                path: '/:storeId/store/nav',
                name: '店铺导航',
                component: './store/storeNavigation/index',
              },
              {
                path: '/:storeId/store/style',
                name: '店铺风格',
                component: './store/storeStyle/index',
              },
              {
                path: '/:storeId/store/info',
                name: '店铺信息',
                component: './setting/storeInfo/index',
              },
              // {
              //   path: '/:storeId/store/shortMessage/list',
              //   name: '手机短信',
              //   component: './store/shortMessage/index',
              // },
              // {
              //   path: '/:storeId/store/shortMessage/record',
              //   name: '充值记录',
              //   component: './store/shortMessage/record',
              // },
              // {
              //   path: '/:storeId/store/shortMessage/sign',
              //   name: '短信签名',
              //   component: './store/shortMessage/sign',
              // },
              {
                path: '/:storeId/store/staff',
                name: '账号管理',
                component: './setting/auth/index',
              },
              {
                path: '/:storeId/store/roles',
                name: '角色管理',
                component: './setting/auth/index',
              },
              {
                path: '/:storeId/store/roles/edit/:id',
                name: '编辑角色',
                component: './setting/auth/role/editRole.js',
              },
              {
                path: '/:storeId/store/staff/info',
                name: '查看权限',
                component: './setting/auth/user/detail.js',
              },
              {
                path: '/:storeId/store/roles/add',
                name: '新建角色',
                component: './setting/auth/role/addRole.js',
              },
              {
                path: '/:storeId/store/address',
                name: '地址库',
                component: './setting/distribution/index',
              },
              {
                path: '/:storeId/store/address/add',
                name: '新增地址',
                component: './setting/distribution/address/add',
              },
              {
                path: '/:storeId/store/address/edit/:id',
                name: '编辑地址',
                component: './setting/distribution/address/edit',
              },
              // {
              //   path: '/:storeId/store/address',
              //   name: '地址库',
              //   component: './setting/distribution/index',
              // },
              // {
              //   path: '/:storeId/store/addAddress',
              //   name: '新增地址',
              //   component: './setting/distribution/address/add',
              // },
              // {
              //   path: '/:storeId/store/editAddress/:id',
              //   name: '编辑地址',
              //   component: './setting/distribution/address/edit',
              // },
              // {
              //   component: '404',
              // },
            ],
          },
          {
            path: '/:storeId/pics',
            name: '图片库',
            component: './gallery/ImageLibrary/index',
          },
          {
            path: '/:storeId/videos',
            name: '视频库',
            component: './video/videoLibrary/index',
          },
          {
            path: '/:storeId/sms',
            name: '手机短信',
            routes:[
              {
                path: '/:storeId/sms',
                name: '手机短信',
                component: './store/shortMessage/index',
              },
              {
                path: '/:storeId/sms/buyrecord',
                name: '充值记录',
                component: './store/shortMessage/record',
              },
              {
                path: '/:storeId/sms/sign',
                name: '短信签名',
                component: './store/shortMessage/sign',
              },
            ]
          },
          {
            path: '/:storeId/delivery',
            name: '快递发货',
            routes: [
              { path: '/:storeId/delivery', redirect: '/:storeId/delivery/express' },
              {
                path: '/:storeId/delivery/express',
                name: '全部',
                component: './order/delivery/index',
              },
              {
                path: '/:storeId/delivery/express/add',
                name: '全部',
                component: './order/delivery/addtemplate',
              },
              {
                path: '/:storeId/delivery/express/edit/:id',
                name: '全部',
                component: './order/delivery/edittemplate',
              },
              {
                path: '/:storeId/delivery/logistics',
                name: '物流公司',
                component: './order/delivery/company',
              },
              {
                path: '/:storeId/delivery/logisticsInquiry',
                name: '物流查询',
                component: './order/delivery/logistics/index',
              },
              {
                path: '/:storeId/delivery/expressbilltemplate/add',
                name: '新建快递单',
                component: './order/delivery/newexpress',
              },
              {
                path: '/:storeId/delivery/expressbilltemplate/edit/:id',
                name: '编辑快递单',
                component: './order/delivery/newexpress',
              },
              {
                path: '/:storeId/delivery/expressbilltemplate/list',
                name: '快递单模板',
                component: './order/delivery/expresslist',
              },
            ],
          },
          {
            path: '/:storeId/goods',
            name: '商品管理',
            routes: [
              { path: '/:storeId/goods', redirect: '/:storeId/goods/onsale' },
              {
                path: '/:storeId/goods/onsale',
                name: '出售中',
                component: './product/goodsList/index',
              },
              {
                path: '/:storeId/goods/soldout',
                name: '已售罄',
                component: './product/goodsList/soldOut',
              },
              {
                path: '/:storeId/goods/instock',
                name: '仓库中',
                component: './product/goodsList/instock',
              },
              {
                path: '/:storeId/goods/groups',
                name: '商品分类',
                component: './product/productClassify/demo',
                // component: './product/productClassify/indexDemo',
              },
              {
                path: '/:storeId/goods/tags',
                name: '商品标签',
                component: './product/productLabel/index',
              },
              {
                path: '/:storeId/goods/detailtemplates',
                name: '商品页模板',
                component: './product/productDetailTemplate/index',
              },
              {
                path: '/:storeId/goods/detailtemplates/add/:spectype/:detailtype',
                name: '新增商品模板',
                component: './product/productDetailTemplate/add',
              },
              {
                path: '/:storeId/goods/detailtemplates/edit/:id',
                name: '编辑商品模板',
                component: './product/productDetailTemplate/edit',
              },
              {
                path: '/:storeId/goods/import',
                name: '商品导入',
                component: '../components/DevelopmentPage/index',
              },
              {
                path: '/:storeId/goods/releaseGoods',
                name: '发布商品',
                component: './product/releaseGoods/index',
              },
              {
                path: '/:storeId/goods/editproduct/:id',
                name: '编辑商品',
                component: './product/releaseGoods/edit',
              },
            ],
          },
          {
            path: '/:storeId/order',
            name: '订单',
            routes: [
              { path: '/:storeId/order', redirect: '/:storeId/order/list' },
              {
                path: '/:storeId/order/list',
                name: '全部',
                component: './order/orderList/index',
              },
              {
                path: '/:storeId/order/details/:id',
                name: '订单详情',
                component: './order/orderDetails/index',
              },
              {
                path: '/:storeId/order/settings',
                name: '交易设置',
                component: './order/setting/index',
              },
              {
                path: '/:storeId/order/setting/notices',
                name: '消息通知',
                component: './order/setting/notices',
              },
              {
                path: '/:storeId/order/delivery/:id',
                name: '发货管理',
                component: './order/deliverManage/deliverysearch',
              },
              // {
              //   path: '/:storeId/order/deliverysearch/:id',
              //   name: '发货管理',
              //   component: './order/deliverManage/deliverysearch',
              // },
              {
                path: '/:storeId/order/localdelivery/:id',
                name: '配送管理',
                component: './order/localdelivery/index',
              },
              {
                path: '/:storeId/order/delivery/batch',
                name: '批量发货',
                component: './order/deliverManage/batchdelivery',
              },
              {
                path: '/:storeId/order/delivery/print/:ids',
                name: '打印发货单',
                component: './order/deliverManage/print',
              },
              {
                path: '/:storeId/order/localdelivery/print/:ids',
                name: '打印小票',
                component: './order/localdelivery/print',
              },
              //评价管理
              {
                path: '/:storeId/order/rates',
                name: '全部评价',
                component: './order/ratesList/index',
              },
              {
                path: '/:storeId/order/rates/pending',
                name: '待审核',
                component: './order/ratesList/index',
              },
              //z自提管理
              {
                path: '/:storeId/order/pickedUp/:id',
                name: '自提管理',
                component: './order/pickedUpList/index',
              },
              {
                path: '/:storeId/order/pickUpVerification',
                name: '自提核销',
                component: './order/pickedUpList/verification',
              },
              //维权
              {
                path: '/:storeId/order/refunds',
                name: '全部',
                component: './order/refundsList/index',
              },
              {
                path: '/:storeId/order/refunds/waitseller',
                name: '待商家处理',
                component: './order/refundsList/waitseller',
              },
              {
                path: '/:storeId/order/refunds/waitbuyer',
                name: '待买家处理',
                component: './order/refundsList/waitbuyer',
              },
              {
                path: '/:storeId/order/refunds/details/:id',
                name: '处理退款',
                component: './order/refundsList/Details',
              },
              {
                path: '/:storeId/order/refunds/record/:id',
                name: '钱款去向',
                component: './order/refundsList/Record',
              },
            ],
          },
          {
            path: '/:storeId/selffetch/settings',
            name: '上门自提',
            component: './order/selfFetch/index',
          },
          {
            path: '/:storeId/customer',
            name: '客户',
            routes: [
              { path: '/:storeId/customer', redirect: '/:storeId/customer/list' },
              {
                path: '/:storeId/customer/list',
                name: '全部客户',
                component: './member/memberList/index',
              },
              {
                path: '/:storeId/customer/searchlist/:id',
                name: '全部客户',
                component: './member/memberList/search',
              },
              {
                path: '/:storeId/customer/detail/:id',
                name: '客户详情',
                component: './member/memberList/detail',
              },
              {
                path: '/:storeId/customer/tags',
                name: '客户标签',
                component: './customer/tags/index',
              },
              {
                path: '/:storeId/customer/tags/add',
                name: '新增标签',
                component: './customer/tags/addtag',
              },
              {
                path: '/:storeId/customer/tags/edit/:id',
                name: '新增标签',
                component: './customer/tags/edittag',
              },
              {
                path: '/:storeId/customer/card',
                name: '会员卡',
                component: './member/membershipCard/index',
              },
              {
                path: '/:storeId/customer/card/add',
                name: '新建会员卡',
                component: './member/releaseCards/index',
              },
              {
                path: '/:storeId/customer/card/edit/:id',
                name: '编辑会员卡',
                component: './member/releaseCards/edit',
              },
              {
                path: '/:storeId/customer/card/copy/:id',
                name: '复制会员卡',
                component: './member/releaseCards/copy',
              },
              {
                path: '/:storeId/customer/points',
                name: '积分管理',
                component: './member/integral/index',
              },
              {
                path: '/:storeId/customer/setting',
                name: '客户设置',
                routes:[
                  { path: '/:storeId/setting', redirect: '/:storeId/customer/setting/notices' },
                  {
                    path: '/:storeId/customer/setting/notices',
                    name: '消息通知',
                    component: './member/notices/index',
                  }
                ]
              },
            ],
          },
          {
            path: '/:storeId/marketing',
            name: '营销',
            routes: [
              { path: '/:storeId/marketing', redirect: '/:storeId/marketing/coupon' },
              {
                path: '/:storeId/marketing/coupon',
                name: '优惠券',
                component: './marketing/coupon/index',
              },
              {
                path: '/:storeId/marketing/coupon/add',
                name: '新增优惠券',
                component: './marketing/coupon/add',
              },
              {
                path: '/:storeId/marketing/coupon/edit/:id',
                name: '编辑优惠券',
                component: './marketing/coupon/edit',
              },
            ],
          },
          // {
          //   path: '/:storeId/setting/store',
          //   name: '设置',
          //   routes: [
          //     {
          //       path: '/:storeId/setting/store/distribution',
          //       redirect: '/:storeId/setting/store/distribution/express',
          //     },
          //     { path: '/:storeId/setting/store', redirect: '/:storeId/setting/store/info' },
          //     {
          //       path: '/:storeId/setting/store/authority',
          //       redirect: '/:storeId/setting/store/authority/staff',
          //     },
          //     // {
          //     //   path: '/:storeId/setting/store/notify',
          //     //   name: '消息通知',
          //     //   component: '../components/DevelopmentPage/index',
          //     // },
          //     {
          //       path: '/:storeId/setting/store/distribution/express',
          //       name: '快递发货',
          //       component: './setting/distribution/index',
          //     },
          //     {
          //       path: '/:storeId/setting/store/distribution/address',
          //       name: '地址库',
          //       component: './setting/distribution/index',
          //     },
          //     {
          //       path: '/:storeId/setting/store/distribution/addAddress',
          //       name: '新增地址',
          //       component: './setting/distribution/address/add',
          //     },
          //     {
          //       path: '/:storeId/setting/store/distribution/editAddress/:id',
          //       name: '编辑地址',
          //       component: './setting/distribution/address/edit',
          //     },
          //     // {
          //     //   path: '/:storeId/setting/store/authority/staff',
          //     //   name: '账号管理',
          //     //   component: './setting/auth/index',
          //     // },
          //     // {
          //     //   path: '/:storeId/setting/store/authority/roles',
          //     //   name: '角色管理',
          //     //   component: './setting/auth/index',
          //     // },
          //     // {
          //     //   path: '/:storeId/setting/store/authority/roles/edit',
          //     //   name: '编辑角色',
          //     //   component: './setting/auth/role/editRole.js',
          //     // },
          //     // {
          //     //   path: '/:storeId/setting/store/authority/staff/info',
          //     //   name: '查看权限',
          //     //   component: './setting/auth/user/detail.js',
          //     // },
          //     // {
          //     //   path: '/:storeId/setting/store/authority/roles/add',
          //     //   name: '新建角色',
          //     //   component: './setting/auth/role/addRole.js',
          //     // },
          //     // {
          //     //   path: '/:storeId/setting/store/bizlog',
          //     //   name: '操作日志',
          //     //   component: './setting/operationLog/operationLog',
          //     // },
          //   ],
          // },
          // {
          //   path: '/:storeId/wechat/kefu',
          //   name: '基本信息',
          //   component: './weapp/customerService/index',
          // },
          {
            path: '/:storeId/wechat',
            name: '微信',
            routes: [
              { path: '/:storeId/wechat', redirect: '/:storeId/wechat/main' },
              {
                path: '/:storeId/wechat/main',
                name: '主体信息',
                component: './weixin/Index',
              },
              {
                path: '/:storeId/wechat/error/:type',
                name: '授权失败',
                component: './weapp/xcxAuth/Index1',
              },
              {
                path: '/:storeId/wechat',
                name: '小程序',
                routes:[
                  {
                    path: '/:storeId/wechat/miniapp',
                    name: '小程序',
                    component: './weapp/xcxAuth/Success3',
                  },
                  {
                    path: '/:storeId/wechat/miniapp/version',
                    name: '版本管理',
                    component: './weapp/xcxVersionManage/index1',
                  },
                  {
                    path: '/:storeId/wechat/miniapp/experiencer',
                    name: '体验者管理',
                    component: './weapp/experienceManage/index1',
                  },
                  {
                    path: '/:storeId/wechat/miniapp/domain',
                    name: '域名服务器',
                    component: './weapp/xcxDNS/index',
                  },
                  {
                    path: '/:storeId/wechat/miniapp/kefu',
                    name: '小程序客服',
                    component: './weapp/customerService/index',
                  },
                ]
              },
              // {
              //   path: '/:storeId/wechat/xcx/info',
              //   name: '基本信息',
              //   component: './weapp/xcxAuth/Success3',
              // },

              // {
              //   path: '/:storeId/wechat/xcx/version',
              //   name: '版本管理',
              //   component: './weapp/xcxVersionManage/index1',
              // },
              // {
              //   path: '/:storeId/wechat/xcx/experiencer',
              //   name: '体验者管理',
              //   component: './weapp/experienceManage/index1',
              // },
              // {
              //   path: '/:storeId/wechat/xcx/customerService',
              //   name: '小程序客服',
              //   component: './weapp/customerService/index',
              // },
              // {
              //   path: '/:storeId/wechat/xcx/weixin',
              //   name: '主体信息',
              //   component: './weixin/Index',
              // },

              // {
              //   path: '/:storeId/wechat/xcx/dns',
              //   name: '域名服务器',
              //   component: './weapp/xcxDNS/index',
              // }
            ],
          },
          {
            path: '/:storeId/finance',
            name: '财务',
            routes: [
              { path: '/:storeId/finance', redirect: '/:storeId/finance/refunds' },
              {
                path: '/:storeId/finance/refunds',
                name: '退款管理',
                component: './finance/refunds/index',
              },
              {
                path: '/:storeId/finance/refunds/records',
                name: '退款记录',
                component: './finance/records/index',
              },
            ],
          },
          {
            name: '结果',
            path: '/result',
            routes: [
              // result
              {
                path: '/result/success',
                name: 'success',
                component: './system/result/Success',
              },
              { path: '/result/fail', name: 'fail', component: './system/result/Error' },
            ],
          },
          {
            name: '错误',
            path: '/:storeId/exception',
            routes: [
              // exception
              {
                path: '/:storeId/exception/403',
                name: 'not-permission',
                component: './system/exception/403',
              },
              {
                path: '/:storeId/exception/404',
                name: 'not-find',
                component: './system/exception/404',
              },
              {
                path: '/:storeId/exception/500',
                name: 'server-error',
                component: './system/exception/500',
              },
              {
                path: '/:storeId/exception/trigger',
                name: 'trigger',
                hideInMenu: true,
                component: './system/exception/TriggerException',
              },
              // {
              //   component: '404',
              // },
            ],
          },
          // {
          //   component: '404',
          // },
        ],
      },
    ],
  },
];
